package Stream;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * @Author Mr.Wen
 * @Version 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Employee implements Comparable {
    private int id;
    private String name;
    private int age;
    private double salary;


    @Override
    public int compareTo(Object o) {
        return this.getAge() - ((Employee) o).getAge();
    }
}
